package com.kejy.service.impl;

import com.kejy.entity.Auction;
import com.kejy.mapper.AuctionWapper;
import com.kejy.service.AuctionService;
import com.kejy.util.MyBatisUtil;

import java.util.List;

public class AuctionServiceImpl implements AuctionService {
    private AuctionWapper auctionWapper = MyBatisUtil.createSqlSession().getMapper(AuctionWapper.class);

    @Override
    public List<Auction> selectList() {
        return auctionWapper.selectList();
    }

    @Override
    public Auction selectById(Integer auctionId) {
        return auctionWapper.selectById(auctionId);
    }

    @Override
    public int insert(Auction auction) {
        return auctionWapper.insert(auction);
    }

    @Override
    public int update(Auction auction) {
        return  auctionWapper.update(auction);
    }

    @Override
    public int delete(Integer auctionId) {
        return auctionWapper.delete(auctionId);
    }
}
